<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">

  <!--组件： 传递给组件中的值：props-->
  <zty v-for="item in items" v-bind:zty="item"></zty>
</div>
<!--导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

<script>

  //定义一个Vue组件component
  Vue.component("zty", {
    props:['zty'],
    template: "<li>{{zty}}</li>"
  });
S
  var vm = new Vue({
    el: "#app",
    data:{
      items: ["zty", "fmj", "mmm"]
    }
  });
</script>
</body>
</html>